<template>
	<view class="main box box-align-center box-pack-center">
		<video :src="url" controls class="video" autoplay></video>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:''
			}
		},
		onLoad(opt) {
			this.url = opt.url
			this.setTitle()
		},
		methods: {
			setTitle() {
				uni.setNavigationBarColor({
					frontColor: '#ffffff',
					backgroundColor: '#000'
				})
			},
			previewImage(val,i) {
				
				console.log(val);
				if (val.type=='jpg'||val.type=='png') {
					uni.previewImage({
						current: val, // 当前显示图片的 http 链接
						urls: this.stuList[i].imgurl.map(res=>{if(res.type != "mp4") return res.url}).filter(i=>i && i.trim()) // 需要预览的图片 http 链接列表
					});
				}
			},
	
		}
	}
</script>

<style scoped lang="scss">
	.main {
		margin: 0;
		padding: 0;
		width: 100%;
		height: 100%;
		background-color: #000;
		
		.video {
			width: 100%;
			height: 100%;
		}
	}
</style>
